<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Migratore</title>
<link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
<script src="http://code.jquery.com/jquery.js"></script>
<script src="js/bootstrap.min.js"></script>
</head>
<body>

	<div class="well well-large"
		style="width: 500px; margin: 0 auto; margin-top: 20px;text-align: center;">
		<h1>PYBCREAT</h1>
		<br> <br>
		<form action="PYBCREAT" method="post" enctype="multipart/form-data" id="form"
			class="form-horizontal">
			<div class="control-group">
				<label class="control-label" for="template">Template: </label>
				<div class="controls">
					<!--  input id="template" type="file" size="50" name="template"-->
					<select id="template" name="template">
						<option value="1">Load</option>
						<option value="2">PL1</option>
						<option value="3">Lancio</option>
						<option value="4" selected>Tutti i file</option>
					</select>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label" for="prg">Chiavi Progressive:
				</label>
				<div class="controls">
					<input id="prg" type="checkbox" name="prg" value="1" />
				</div>
			</div>
			<div class="control-group">
				<label class="control-label" for="meta">Meta-Modello:
				</label>
				<div class="controls">
					<input id="meta" type="file" size="50" name="meta">
				</div>
			</div>
			<br>
			<center>
				<input id="genera" type="button" value="Genera" class="btn btn-primary" style="display: none;">
			</center>
			<br>
		</form>
		<div id="loader" style="display: none">
		<img src="img/loader.gif" /><h2>Elaborazione...</h2>
		</div>
	</div>
	<script type="text/javascript">
		$(document).ready(function() {
			//$('.dropdown').dropdown();
			var meta = false;
			var tmp = false;
			$('#meta').change(function(){
				meta = true;
				validate();
			});
			/*$('#template').change(function(){
				tmp = true;
				validate();
			});*/
			
			function validate(){
				if(meta){
					$("#genera").toggle();
				}
			}
			$("#genera").click(function(){
				$("#form").toggle();
				$("#loader").toggle();
				$("#form").submit();
				
				
			});
			
		});
		
		
	</script>
</body>
</html>